/*
 * @Description: 
 * @Date: 2020-12-28 10:30:40
 * @LastEditors: lother
 * @LastEditTime: 2020-12-28 10:31:42
 * @FilePath: \AccountOpening-H5\src\locales\vantLocale.js
 */
// vant翻译
import {
    Locale
} from 'vant';
import zhCN from 'vant/lib/locale/lang/zh-CN';
import enUS from 'vant/lib/locale/lang/en-US';
var lang = localStorage.getItem("lang") || "zh-CN";
changeLang(lang);
 
function changeLang(newlang) {
    switch (newlang) {
        case "zh-CN":
            Locale.use('zh-CN', zhCN);
            break;
        case "en-US":
            Locale.use('en-US', enUS);
            break;
    }
}
 
export function Local(mylang) {
    changeLang(mylang)
}